<?php

use Illuminate\Routing\Router;

Admin::registerHelpersRoutes();

Route::group([
    'prefix'        => config('admin.prefix'),
    'namespace'     => Admin::controllerNamespace(),
    'middleware'    => ['web', 'admin'],
], function (Router $router) {

    $router->get('/', 'ApplicationController@index');
    $router->get('Home', 'HomeController@index');
    $router->resource('users', UserController::class);
    $router->resource('projects', ProjectsController::class);
    $router->resource('application', ApplicationController::class);
    $router->resource('customer', CustomerController::class);
    $router->resource('manager', ManagerController::class);
    $router->resource('geo', GeoController::class);
    $router->resource('auth/forget', "AuthController@forget");
    $router->resource('auth/reset', "AuthController@reset");
//    $router->post('projects', ProjectsController::class);
//    Route::get('/admin/projects/method/{method}', 'App\Admin\Controllers\ProjectsController@showMethods');
    $router->get('projects/method/{method}', 'ProjectsController@showMethods');
    $router->get('application/index/{method}', 'ApplicationController@index');

});
//Route::post('/admin/projects/save', function () {
//// 验证请求...
//       return back()->withInput();
//});
